import request from '@/config/axios'

export interface WageManHourValuationVO {
  id: number
  manHourType: string
  dictManHourValuationStatus: number
  unitPrice: number
  explaind: string
}

// 查询工时记价列表
export const getWageManHourValuationPage = async (params) => {
  return await request.get({ url: `/config/wage-man-hour-valuation/page`, params })
}

// 查询工时记价详情
export const getWageManHourValuation = async (id: number) => {
  return await request.get({ url: `/config/wage-man-hour-valuation/get?id=` + id })
}

// 新增工时记价
export const createWageManHourValuation = async (data: WageManHourValuationVO) => {
  return await request.post({ url: `/config/wage-man-hour-valuation/create`, data })
}

// 修改工时记价
export const updateWageManHourValuation = async (data: WageManHourValuationVO) => {
  return await request.put({ url: `/config/wage-man-hour-valuation/update`, data })
}

// 删除工时记价
export const deleteWageManHourValuation = async (id: number) => {
  return await request.delete({ url: `/config/wage-man-hour-valuation/delete?id=` + id })
}

// 导出工时记价 Excel
export const exportWageManHourValuation = async (params) => {
  return await request.download({ url: `/config/wage-man-hour-valuation/export-excel`, params })
}
// 下载导入模板
export const importWageManHourValuationTemplate = async () => {
  return await request.download({ url: `/config/wage-man-hour-valuation/get-import-template` })
}
